package com.spring.test.service.impl;

import com.spring.test.service.OrderService;
import com.spring.test.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;


@Lazy(false)
//@DependsOn("productServiceImpl")
@Service
public class OrderServiceImpl implements OrderService {
	@Autowired
	private ProductService productService;

	public OrderServiceImpl() {
		System.out.println("orderServiceImpl 初始化，构造函数被调用");
	}

	@Override
	public void test(){
	   System.out.println(productService);
	}
}
